<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <meta name="page-help" content="https://getrebuild.com/docs/admin/projects" />
    <title>[[${bundle.L('项目管理')}]]</title>
    <style type="text/css">
      #members {
        min-height: 37px;
      }
      .plan-boxes {
        background-color: #eee;
        white-space: nowrap;
        overflow: auto;
        border-radius: 2px;
        margin: 0;
      }
      .plan-boxes.card-list .card {
        padding: 0;
        width: 180px;
        display: inline-block;
        margin: 20px 0 15px 20px;
      }
      .plan-boxes.card-list .card .card-body {
        cursor: move;
      }
      .plan-boxes.card-list .card:last-child {
        margin-right: 20px;
      }
      #principal,
      #members {
        min-height: 37px;
      }
      #cardFields {
        margin-top: 6px;
      }
      #cardFields > label {
        min-width: 130px;
        margin-bottom: 6px;
      }
    </style>
  </head>
  <body>
    <div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo rb-color-header" th:classappend="${sideCollapsedClazz}">
      <th:block th:replace="~{/_include/nav-top}" />
      <th:block th:replace="~{/_include/nav-left-admin(active='projects')}" />
      <div class="rb-content">
        <div class="page-head">
          <div class="float-left">
            <div class="page-head-title">[[${bundle.L('项目')}]]<span class="sub-title">[[${projectName}]]</span></div>
          </div>
          <div class="float-right pt-1"></div>
          <div class="clearfix"></div>
        </div>
        <div class="main-content container-fluid pt-0">
          <div class="card mb-0">
            <div class="card-body">
              <form class="simple">
                <div class="form-group row">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right">[[${bundle.L('项目范围')}]]</label>
                  <div class="col-12 col-lg-9 pt-1">
                    <label class="custom-control custom-control-sm custom-radio custom-control-inline">
                      <input class="custom-control-input" type="radio" name="scope" id="scope_1" value="1" checked />
                      <span class="custom-control-label">[[${bundle.L('公开 (所有人可见，仅成员可编辑)')}]]</span>
                    </label>
                    <label class="custom-control custom-control-sm custom-radio custom-control-inline">
                      <input class="custom-control-input" type="radio" name="scope" id="scope_2" value="2" />
                      <span class="custom-control-label">[[${bundle.L('私有 (仅成员可见和编辑)')}]]</span>
                    </label>
                  </div>
                </div>
                <div class="form-group row pt-0">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right">[[${bundle.L('负责人')}]]</label>
                  <div class="col-12 col-lg-9">
                    <div id="principal"></div>
                    <p class="form-text">[[${bundle.L('负责人拥有对任务的管理权限')}]]</p>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right">[[${bundle.L('项目成员')}]]</label>
                  <div class="col-12 col-lg-9">
                    <div id="members"></div>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right">[[${bundle.L('任务面板')}]]</label>
                  <div class="col-12 col-lg-9">
                    <div class="plan-boxes card-list mb-2" id="plans">
                      <p class="text-muted m-3">[[${bundle.L('加载中')}]]</p>
                    </div>
                    <button class="btn btn-secondary btn-sm J_add-plan" type="button"><i class="zmdi zmdi-plus"></i> [[${bundle.L('添加')}]]</button>
                  </div>
                </div>
                <div class="form-group row">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right">[[${bundle.L('任务卡显示字段')}]]</label>
                  <div class="col-12 col-lg-9">
                    <div id="cardFields">
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="createdBy" />
                        <span class="custom-control-label">[[${bundle.L('创建人')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="createdOn" checked />
                        <span class="custom-control-label">[[${bundle.L('创建时间')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="modifiedOn" />
                        <span class="custom-control-label">[[${bundle.L('更新时间')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="endTime" checked />
                        <span class="custom-control-label">[[${bundle.L('完成时间')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="description" />
                        <span class="custom-control-label">[[${bundle.L('详情')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="attachments" />
                        <span class="custom-control-label">[[${bundle.L('附件')}]]</span>
                      </label>
                      <label class="custom-control custom-control-sm custom-checkbox custom-control-inline">
                        <input class="custom-control-input" type="checkbox" value="_tag" checked />
                        <span class="custom-control-label">[[${bundle.L('标签')}]]</span>
                      </label>
                    </div>
                  </div>
                </div>
                <div class="form-group row footer">
                  <label class="col-12 col-lg-3 col-form-label text-lg-right"> </label>
                  <div class="col-12 col-lg-9">
                    <button class="btn btn-primary J_save btn-space" type="button">[[${bundle.L('保存')}]]</button>
                    <button class="btn btn-danger btn-outline J_status btn-space" type="button">[[${bundle.L('归档')}]]</button>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script>
      window.__PageConfig = {
        id: '[[${projectId}]]',
        scope: ~~'[[${scope}]]',
        principal: '[[${principal}]]',
        members: '[[${members}]]',
        extraDefinition: [(${extraDefinition ?:'null'})],
        status: [[${status}]],
      }
    </script>
    <script th:src="@{/assets/js/project/project-editor.js}" type="text/babel"></script>
  </body>
</html>
